<?php
namespace Admin\Controller;
use Common\Controller\BaseController;
/**
 * 用户管理
 * Class UserController
 * @package Admin\Controller
 */
class UsersController extends BaseController{
    const modelName = CONTROLLER_NAME;
    protected function _initialize(){
        parent::_initialize();
        $this->checkAuth();
        $this->model = D(self::modelName);
    }

    /**
     * 列表
     */
    public function index(){
        if(IS_AJAX){
            //获取列表
            $this->create_condition($map);
            $field = 'id AS pk_id,nickname,money';
            $this->data = $this->getRows(self::modelName, $map ,$field ,1);
            $this->rtnResult(0);
        }else{
            //表头、字段名
            $data['field'] = 'pk_id,nickname,money';
            $data['titleArr'] = array('编号','昵称','余额');
            $this->showView($data,'./Public/Admin/Tpl/index.html');
        }
    }





}
?>
